package xml;

import cn.hutool.core.util.XmlUtil;
import com.oneheart.xp.framework.init.SysParams;
import org.w3c.dom.Document;

import java.io.File;

import static com.oneheart.xp.framework.init.SysParams.getRealPath;

public class ReadXML {
    public static void main(String[] args) {
        // XmlUtil.readXML 读取XML文件
//        Document document1 = XmlUtil.readXML(new File(getRealPath("WEB-INF/config/init/xml/init-attach.xml")));

        // 直接给绝对路径
        Document document2 = XmlUtil.readXML(new File("D:/work/xikuan/biz/out/artifacts/mfbgs_war_exploded/WEB-INF/config/init/xml/init-attach.xml"));



        // XmlUtil.parseXml 解析XML字符串为Document对象
    }
}
